Throwable

open class Throwable(message: String?, cause: Throwable?)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Parameters

message

the detail message string.

cause

the cause of this throwable.

Constructors

Throwable
Link copied to clipboard
fun Throwable(message: String?)
Throwable
Link copied to clipboard
fun Throwable(cause: Throwable?)
Throwable
Link copied to clipboard
fun Throwable()
Throwable
Link copied to clipboard
fun Throwable(message: String?, cause: Throwable?)

Properties

cause
Link copied to clipboard
open val cause: Throwable?
message
Link copied to clipboard
open val message: String?

Inheritors

Error
Link copied to clipboard
Exception
Link copied to clipboard

Extensions

addSuppressed
Link copied to clipboard
expect fun Throwable.addSuppressed(exception: Throwable)

When supported by the platform, adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

actual fun Throwable.addSuppressed(exception: Throwable)

When supported by the platform, adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

getStackTraceAddresses
Link copied to clipboard
fun Throwable.getStackTraceAddresses(): List<Long>

Returns a list of stack trace addresses representing the stack trace pertaining to this throwable.

printStackTrace
Link copied to clipboard
expect fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard output or standard error output.

inline fun Throwable.printStackTrace(writer: PrintWriter)

Prints the detailed description of this throwable to the specified writer.

inline fun Throwable.printStackTrace(stream: PrintStream)

Prints the detailed description of this throwable to the specified stream.

actual inline fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard error output.

actual fun Throwable.printStackTrace()

Prints the detailed description of this throwable to console error output.

actual inline fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard output.

stackTrace
Link copied to clipboard
val Throwable.stackTrace: Array<StackTraceElement>

Returns an array of stack trace elements representing the stack trace pertaining to this throwable.

stackTraceToString
Link copied to clipboard
expect fun Throwable.stackTraceToString(): String

Returns the detailed description of this throwable with its stack trace.

actual fun Throwable.stackTraceToString(): String

Returns the detailed description of this throwable with its stack trace.

actual fun Throwable.stackTraceToString(): String

Returns the detailed description of this throwable with its stack trace.

actual fun Throwable.stackTraceToString(): String

Returns the detailed description of this throwable with its stack trace.

suppressedExceptions
Link copied to clipboard
expect val Throwable.suppressedExceptions: List<Throwable>

Returns a list of all exceptions that were suppressed in order to deliver this exception.

actual val Throwable.suppressedExceptions: List<Throwable>

Returns a list of all exceptions that were suppressed in order to deliver this exception.

actual val Throwable.suppressedExceptions: List<Throwable>

Returns a list of all exceptions that were suppressed in order to deliver this exception.

actual val Throwable.suppressedExceptions: List<Throwable>

Returns a list of all exceptions that were suppressed in order to deliver this exception.